        <div id="back-link">
        <a href="javascript:history.back()">Back to elector list</a>
        </div>
        
        <div id="name-area">
        
        	<h1><?php echo $person->surname ?>, <?php echo $person->first_names ?></h1>
        	<div id="person-18th"><strong>18th birthday:</strong> 
        	<?php if (!is_null ($person->bday_18))
                  {
                      echo strftime ("%d %b %Y", strtotime ($person->bday_18));
                  }
                  else
                  {
                      echo "Not available";
                  }
			?>
        	</div>
            <div id="person-id"><strong>Internal Id:</strong> <?php echo $person->id ?></div>
        	
        </div>
        
        <div id="address-area">
        
            <?php 
        	   echo person_display_addresses ($addresses);
        	?>
        </div>
        
        <?php if (count ($aliases) > 0)
        {
        ?>  
        
        <div id="alias-area">
            <?php 
               echo person_display_aliases ($aliases, $roll);
            ?>
        </div>
        
        <?php
        } 
        ?>
        
        <div id="voting-area">
            <?php 
               echo person_display_voting_area ($voting_record);
            ?>
        </div>
        <div id="contact-area">
            <?php 
               echo person_display_contacts ($contacts);
            ?>
            
    <?php 
        $attributes = array('id' => 'add-canvassing-notes' );
        echo form_open ("person/add_canvassing_notes", $attributes);
    ?>
    
    <br/>
    
    <fieldset>
        <legend>Add Canvassing Notes</legend>
        <div>

        <script>
            $(function()
            {
                $( "#datepicker" ).datepicker
                ({
                    dateFormat: "d M y",
                    altField: "#datedisplay",
                    altFormat: "d M y",
                    defaultDate: <?php echo ('"' . $canvass_date . '"');?>
                });
            });
        </script>

     <table>
     <tr>
     <td class="layout" valign="top">
    <input type="hidden" name="id" value="<?php echo $person->id ?>" />
    <input type="hidden" name="roll" value="<?php echo $roll ?>" />

    <label for="date">
        Date
        <input id="datedisplay" name="date" type="text" value="<?php echo $canvass_date ?>" />
    </label>

    <div id="datepicker"></div>

    </td>
    
    <td class="layout" valign="top">
    <label for="canvasser">
        Canvasser
        <input name="canvasser" type="text" value="<?php echo $canvasser ?>" />
    </label>

    <label for="party">
        Party
        <input name="party" type="text" value="" />
    </label>

    <label for="rank">
        Rank
        <select name="rank">
          <option value="-1">unknown</option>
          <option value="1">(1) Definite Green</option>
          <option value="2">(2) Probable Green</option>
          <option value="3">(3) May vote Green</option>
          <option value="4">(4) Definitely not Green</option>
        </select> 
    </label>

	<input type="submit" name="submit" value="Add" />
    </td>
    
    <td class="layout" valign="top">
    <label for="notes">
        Notes
        <textarea name="notes" rows="6" cols="40"></textarea>
    </label>

	</td>
	</tr>
	</table>
	
    </div>
    </fieldset>
    </form>

                        
        </div>

        <div id="back-link">
        <a href="javascript:history.back()">Back to elector list</a>
        </div>
                